 import { Routes, Route } from "react-router-dom";
 import Home from "@/pages/Home";
 import ImageDetail from "@/pages/ImageDetail";
 import { useState } from "react";
 import { AuthContext } from '@/contexts/authContext';
 
 export default function App() {
   const [isAuthenticated, setIsAuthenticated] = useState(false);
 
   const logout = () => {
     setIsAuthenticated(false);
   };
 
   return (
     <AuthContext.Provider
       value={{ isAuthenticated, setIsAuthenticated, logout }}
     >
       <Routes>
         <Route path="/" element={<Home />} />
         <Route path="/detail/:id" element={<ImageDetail />} />
         <Route path="*" element={<div className="flex h-screen w-full items-center justify-center text-center text-xl text-gray-600">页面未找到</div>} />
       </Routes>
     </AuthContext.Provider>
   );
 }
